﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.ComponentModel.DataAnnotations;

namespace mBlog.Data.Entities
{
    public class Comment
    {
        public long Id { get; set; }

        [StringLength(250)]
        [Required]
        public string Author { get; set; }

        [StringLength(250)]
        public string Url { get; set; }

        [Column(TypeName="ntext")]
        [Required]
        public string Content { get; set; }

        [Column(TypeName="varchar")]
        [StringLength(250)]
        [Required]
        public string Email { get; set; }

        [Column(TypeName = "varchar")]
        [StringLength(250)]
        public string Site { get; set; }

        [Column(TypeName = "varchar")]
        [StringLength(250)]
        public string Ip { get; set; }

        public DateTime CommentTime { get; set; }
        public bool IsSpam { get; set; }

        public  virtual Post Post { get; set; }
    }
}